import http from '@/utils/http';

export interface CategoryTopItem {
  children: Child[];
  id: string;
  imageBanners: string[];
  name: string;
  picture: string;
}

export interface Child {
  brands: null;
  categories: null;
  goods: GoodsItem[];
  id: string;
  name: string;
  parentId: null;
  parentName: null;
  picture: string;
  saleProperties: null;
}

export interface GoodsItem {
  desc: string;
  discount: null;
  id: string;
  name: string;
  orderNum: number;
  picture: string;
  price: string;
}
export const getCategoryTop = () => {
  return http<CategoryTopItem[]>({
    url: '/category/top',
    method: 'GET',
  });
};
